<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "Question".
 *
 * @property integer $id
 * @property integer $active_id
 * @property string $title
 * @property string $ask1
 * @property string $answer1
 * @property string $ask2
 * @property string $answer2
 * @property string $ask3
 * @property string $answer3
 * @property string $ask4
 * @property string $answer4
 * @property string $ask5
 * @property string $answer5
 * @property string $ask6
 * @property string $answer6
 * @property string $ask7
 * @property string $answer7
 * @property string $ask8
 * @property string $answer8
 * @property string $ask9
 * @property string $answer9
 * @property string $ask10
 * @property string $answer10
 * @property integer $sys_dateline
 * @property integer $sys_lastmodify
 * @property integer $sys_status
 * @property string $sys_ip
 */
class Question extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'Question';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['active_id', 'sys_dateline', 'sys_lastmodify', 'sys_status'], 'integer'],
            [['title', 'ask1', 'answer1', 'ask2', 'answer2', 'ask3', 'answer3', 'ask4', 'answer4', 'ask5', 'answer5', 'ask6', 'answer6', 'ask7', 'answer7', 'ask8', 'answer8', 'ask9', 'answer9', 'ask10', 'answer10', 'sys_ip'], 'required'],
            [['title', 'ask1', 'answer1', 'ask2', 'answer2', 'ask3', 'answer3', 'ask4', 'answer4', 'ask5', 'answer5', 'ask6', 'answer6', 'ask7', 'answer7', 'ask8', 'answer8', 'ask9', 'answer9', 'ask10', 'answer10'], 'string', 'max' => 255],
            [['sys_ip'], 'string', 'max' => 50],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => '问答ID',
            'active_id' => '所属活动ID',
            'title' => '问题描述',
            'ask1' => '问题1',
            'answer1' => '答案1',
            'ask2' => 'Ask2',
            'answer2' => 'Answer2',
            'ask3' => 'Ask3',
            'answer3' => 'Answer3',
            'ask4' => 'Ask4',
            'answer4' => 'Answer4',
            'ask5' => 'Ask5',
            'answer5' => 'Answer5',
            'ask6' => 'Ask6',
            'answer6' => 'Answer6',
            'ask7' => 'Ask7',
            'answer7' => 'Answer7',
            'ask8' => 'Ask8',
            'answer8' => 'Answer8',
            'ask9' => 'Ask9',
            'answer9' => 'Answer9',
            'ask10' => 'Ask10',
            'answer10' => 'Answer10',
            'sys_dateline' => '创建时间',
            'sys_lastmodify' => '最后修改时间',
            'sys_status' => '状态，0 正常，1 删除',
            'sys_ip' => '发布人的IP',
        ];
    }

}
